var LevelData = cc.Class({
    extends: cc.Component,

    properties: ()=>({
        levelNum: 0,
        speed: 0,
    }),
    setLev: function (btnlv,val) {
        this.levelNum = btnlv;
        this.speed = val;
        // this.levelNum = val;
        cc.game.addPersistRootNode(this.node);
        cc.log(this.levelNum,this.speed,'Main第一次赋值');
    },
    updateLevelNum: function(LevelNum,speed){
        if(this.levelNum != LevelNum) {
            LevelNum = this.levelNum;
        }
        if(this.speed != speed) {
            speed = this.speed;
        }
        cc.log(LevelNum,this.levelNum,this.speed,speed,"Game第二次赋值");
        cc.game.removePersistRootNode(this.node);
    },
});
module.exports = LevelData;
